import bus from '@/bus' 
let data = {
  data: [],
  totalItem: 1,
  currentPage: 1,
  pageSize: window.$pageSize,
  columns: [{
    title: '经销商名',
    key: 'distributorName',
    align: 'left',
    minWidth: 200
  }, {
    title: '经销商联系人',
    key: 'distributorLinkName',
    align: 'left',
    minWidth: 200
  }, {
    title: '经销商联系手机',
    key: 'distributorPhone',
    align: 'left',
    minWidth: 200,
    render: (h, params) => {
      return h('div', params.row.distributorPhone)
    }
  }, {
    title: '限购数量',
    key: 'limitNum',
    align: 'right',
    minWidth: 200
  }, {
    title: '操作',
    align: 'right',
    minWidth: 200,
    render: (h, params) => {
      const row = params.row
      let editBtn = h('Button', {
        props: {
          size: 'small',
          type: 'primary'
        },
        style: {
          'margin-right': '5px'
        },
        on: {
          click: () => {
            bus.$emit('onEditDistri', { item: row, index: params.index })
          }
        }
      }, '修改')
      let deleteBtn = h('Button', {
        props: {
          size: 'small',
          type: 'default'
        },
        style: {
          'margin-right': '5px'
        },
        on: {
          click: () => {
            bus.$emit('onDeleteDistri', { item: row, index: params.index })
          }
        }
      }, '删除')
      return h('div', [editBtn, deleteBtn])
    }
  }]
}
export default data